<?php

	 $db_host = 'localhost';
	 $db_user = 'function';
	 $db_pwd = 'w9ak4X1l0Y';

	 $database = 'function_a5110060';

	 $table = 'Availability_Details';

	$con = mysql_connect($db_host, $db_user, $db_pwd);
	if (!$con)
	die("Can't connect to database");
	mysql_select_db($database,$con);

	$functionHallId = $_REQUEST['functionHall'];
	$dates = $_REQUEST['dates'];
	$status = $_REQUEST['status'];
	$slots = $_REQUEST['slots'];


	//echo $functionHallId."           ".$dates."            ".$status."           ".$slots;
	
	$sql="update {$table} set status = '".$status."' where function_hall_id = ".$functionHallId." and slot = '".$slots."' and dates = '".$dates."'";
	//echo("Sql :".$sql);
	$result=mysql_query($sql);
	 
	//echo("Result :".$result);
	header("Location: ../EditAvailabilityDetails.php");
?> 